package com.jichaoyun.service;

import com.jichaoyun.common.model.PagedResult;
import com.jichaoyun.model.entity.FlowDay;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.Map;

/**
* @author zhen
* @description 针对表【flow_day】的数据库操作Service
* @createDate 2023-11-23 21:53:19
*/
public interface IFlowDayService extends IService<FlowDay> {

    /**
     * 单用户月报表，导出到Excel
     * @param station_no
     * @param year
     * @param month
     * @param response
     * @throws IOException
     */
    void getUserMonthDataExcel(Integer station_no, Integer year, Integer month,HttpServletResponse response) throws IOException;

    /**
     * 生成月度报表
     * @param station_no
     * @param year
     * @param month
     * @return
     * @throws IOException
     */
    File generateMonthlyExcelFile(Integer station_no , Integer year, Integer month) throws IOException;

    /**
     * 获取某月站点月报信息
     * @param station_no
     * @param year
     * @param month
     * @return
     */
    Map<String, Object> getStationMonthForm(Integer station_no, Integer year, Integer month);

    Map<String, Object> getAppStationMonthForm(Integer station_no, Integer year, Integer month);


    /**
     * 根据日期查询全部用户
     * @param theDay
     * @param pageNo
     * @return
     */
    PagedResult getAllMultiStationDayFormPage(LocalDateTime theDay, Integer pageNo);

    /**
     * 导出全部的用户到Excel
     * @param theDay
     * @param response
     * @throws IOException
     */
    void getAllMultiStationDayForm(LocalDateTime theDay, HttpServletResponse response) throws IOException;

    /**
     * 根据站号、日期查询多用户中日报表
     * @param theDay
     * @param stationNo
     * @return
     */
    Map<String, Object> getMultiStationDayFormByStation(LocalDateTime theDay, Integer stationNo);
}
